| Conditions | 5 |
| Paths | 9 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.2742 |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | /** |
||
| 8 | 1 | router.afterEach((to, from) => { |
|
| 9 | 2 | const { meta } = to |
|
| 10 | |||
| 11 | // if has meta |
||
| 12 | 2 | if (meta) { |
|
| 13 | // if has title |
||
| 14 | 2 | if (meta.title) { |
|
| 15 | 1 | setTitle(meta.title) |
|
| 16 | } |
||
| 17 | |||
| 18 | // if has titlePrefix |
||
| 19 | 2 | if (meta.titlePrefix) { |
|
| 20 | setPrefix(meta.titlePrefix) |
||
| 21 | } |
||
| 22 | |||
| 23 | // if has titleSuffix |
||
| 24 | 2 | if (meta.titleSuffix) { |
|
| 25 | setSuffix(meta.titleSuffix) |
||
| 26 | } |
||
| 27 | } |
||
| 28 | }) |
||
| 29 | } |
||
| 32 |